package com.example.spring.cloud.consumer.feign.hystrix;

import com.example.spring.cloud.bean.User;
import com.example.spring.cloud.common.Result;
import com.example.spring.cloud.consumer.feign.UserFeign;
import org.springframework.stereotype.Component;

@Component
public class UserFeignHystrix implements UserFeign {
    @Override
    public Result<User> add(User user) {
        Result<User> result = new Result<>();
        result.fail("服务不可用");
        return result;
    }

    @Override
    public Result<User> get(Integer id) {
        Result<User> result = new Result<>();
        result.fail("服务不可用");
        return result;
    }
}
